#pragma once

#include <QWidget>
#include <Chart/qcustomplot.h>
#include <Frameless/BaseWidget.h>
#include <boost/signals2.hpp>
namespace Ui { class DragChart_PointSet; };

enum PlotSelecteMode
{
	All_Visable = 0,
	Selected =1,
};

enum GainMode
{
	Delta = 0,
	Replace =1
};

class PointSetResult
{
public:
	PointSetResult() {};
	~PointSetResult() {};

public:
	PlotSelecteMode selectedMode;
	GainMode gainMode;
	QCPGraph* plot = NULL;
	double value;
};


class DragChart_PointSet : public BaseWidget
{
	Q_OBJECT

public:
	DragChart_PointSet(QCustomPlot* chart, QWidget *parent = Q_NULLPTR);
	~DragChart_PointSet();
	typedef boost::signals2::signal<void(PointSetResult&)> SetChangedSignal;
	typedef boost::signals2::signal<void(PointSetResult&)>::slot_function_type SetChangedSlot;
	SetChangedSignal onSetChanged;
private:
	Ui::DragChart_PointSet *ui;
	QCustomPlot* m_chart;
	QCPGraph * m_selected= NULL;
};
